package cn.dmrliu.edu.publish.bean;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ToolExamScoreStats {
    // 分时段
    Integer flag;
    // 人数
    Long userCt;


    public String getScoreSection() {
        int min = 20 * (flag - 1);
        int max = 20 * flag;
        return min + "-" + max;
    }

    @Override
    public String toString() {
        return "{\n" +
                "  \"name\": \"" + this.getScoreSection() + "\",\n" +
                "  \"value\": " + this.userCt + "\n" +
                "}";
    }
}
